#include <iostream>

#include "Task.hpp"
#include "Thread_pool.hpp"
#include "Log.hpp"
#include "Lockguard.hpp"
#include "Thread.hpp"

using namespace log_ns;
int main()
{
    EnableScreen();
    int cnt=10;
    while (cnt)
    {
        sleep(1);
        Task t(1,1);
        ThreadPool<Task>::GetInstance()->Equeue(t);
        LOG(INFO, "equeue a task, %s\n", t.debug().c_str());
        sleep(1);
        cnt--;

    }
    ThreadPool<Task>::GetInstance()->Stop();
    LOG(INFO,"thread pool stop!\n");
    return 0;
}
